<template>
  <div class="about">
    <com a="3" :num="num" @change="getchild"></com>
  </div>
</template>

<script setup>
  import com from "@/components/com.vue"
  import{ref} from "vue"
  let num=ref(1)

  // 子传父的接受
  function getchild(val){
    console.log(val)
    num.value=val
  }
</script>

<style>
</style>